#pragma once

#include "Polygon.h"
#include "Edge.h"
#include "ImageBitmap.h"

namespace HW2{
	struct World{
	    int id;//PAVEL
		ImageBitmap* getPolygonByPoint2(int px, int py);

		std::vector<ImageBitmap> bitmaps;

		Coordinates minPoint, maxPoint;
		double initialRatio;
		bool isPerspective;
		
		int filterSize;
		int filterType;


		Color BackgroundColor;
		std::vector<Polygon> polygons;
		std::vector<Edge> edges;
		std::vector<Edge> boundingBox;
		std::vector<Edge> normals;
		std::vector<Edge> polygonsNormals;
		
		void addPolygon(Polygon &p);

		World();

		void reset();
		void init();
		void finishConstruction();


		static World& get()
		{
			static World w;
			return w;
		}


	};




}